#include <reg52.h>
#define uint unsigned int
#define uchar unsigned char
uchar code led[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};
void delay1ms(uint i)
{
	uchar j;
	while(i--)
		for(j=0;j<125;j++);
}
void main()
{
	unsigned char i;
	while(1)
	{
		for(i=0;i<=7;i++)
		{
			P1=led[i];
			delay1ms(500);
		}
	}
}